cmake_minimum_required(VERSION 3.15)
project(tcp)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
SET(CMAKE_CXX_STANDARD 11) # 设置 C++ 标准
SET(CMAKE_CXX_STANDARD_REQUIRED ON) # 强制使用指定的 C++ 标准
SET(CMAKE_CXX_FLAGS "-g -w")

# target_include_directories
include_directories($ (PROJECT_SOURCE_DIR) /inc)
include_directories($ (PROJECT_SOURCE_DIR))

add_executable(cli client.cpp net_op.cpp)

add_executable(svr_tcp server_tcp.cpp net_op.cpp)
add_executable(svr_select server_select.cpp net_op.cpp)
add_executable(svr_poll server_poll.cpp net_op.cpp)
add_executable(svr_epoll server_epoll.cpp net_op.cpp)
add_executable(svr_libevent server_libevent.cpp net_op.cpp)

# 设置文件的属性
# set_source_files_properties(aaa.cpp PROPERTIES LANGUAGE C)

# 用 C99 规范